package com.tangsm.spring.boot.mybatis.plus.controller;

import com.tangsm.spring.boot.mybatis.plus.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserInfoController {
    @Autowired
    private UserInfoService userInfoService;

    /**
     * 添加
     *
     * @return 响应结果
     */
    @PostMapping("/add")
    public String add() {
        return userInfoService.add();
    }

    /**
     * 批量添加
     *
     * @return 响应结果
     */
    @PostMapping("/addBatch")
    public String addBatch() {
        return userInfoService.addBatch();
    }

    /**
     * 更新
     *
     * @return 响应结果
     */
    @PostMapping("/up")
    public String up() {
        return userInfoService.up();
    }
}
